-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phi-3 Vision Android App #456
base: main
Are you sure you want to change the base?
Conversation
|
||
|
||
inputTensors = multiModalProcessor.processImages(promptQuestion_formatted, images); | ||
generatorParams.setInput(inputTensors); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to update this to get it to build:
generatorParams.setInput(inputTensors); | |
generatorParams.setInputs(inputTensors); |
FileOutputStream out = new FileOutputStream(filename); | ||
bmp.compress(Bitmap.CompressFormat.PNG, 100, out); // bmp is your Bitmap instance | ||
// PNG is a lossless format, the compression factor (100) is ignored | ||
images = new Images(filename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, was running into an error here:
java.lang.UnsatisfiedLinkError: No implementation found for long ai.onnxruntime.genai.Images.loadImages(java.lang.String) (tried Java_ai_onnxruntime_genai_Images_loadImages and Java_ai_onnxruntime_genai_Images_loadImages__Ljava_lang_String_2) - is the library loaded, e.g. System.loadLibrary?
this ort-genai PR should fix it:
microsoft/onnxruntime-genai#797
Added Phi-3 Vision support to "Local Chatbot on Android with Phi-3, ONNX Runtime Mobile and ONNX Runtime Generate() API" project using the generate() Java API.
Main changes: